Skip to main content

ARDK for Android/com.nianticlabs.ardk.vps/VPSCoverageSession/getHintImage

getHintImage

[androidJvm]
suspend fun getHintImage(hintUrl: String, timeoutMillis: Long = TIMEOUT_MS): AsyncResult<ByteArray, VpsCoverageError>

Asynchronously downloads a hint image from a given URL.

This function encapsulates the entire request-and-poll loop, suspending execution until the download is complete, has failed, or has timed out.

Return​

An AsyncResult which will be either AsyncResult.Success containing the image ByteArray, AsyncResult.Error detailing the failure reason, or AsyncResult.Timeout indicating a timeout in the process.

Parameters​

androidJvm

hintUrlURL of the hint image to download.
timeoutMillisThe maximum time in milliseconds to wait for the download to complete.